<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<title>Configuring the Library</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="generator" content="Doc-O-Matic" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <link rel="STYLESHEET" href="default.css" type="text/css" />

<script type="text/javascript" src="scripts.js"></script>
</head>
<body class="Element700" onload="onBodyLoadEx('frames.html', 'topic', '00116.html');" onmousedown="onBodyMouseDown();">

<!-- Begin Popups -->

<!-- End Popups -->

<!-- Begin Page Header -->
<div class="Element710" id="areafixed">
<div class="Element94">
<a href="00007.html" target="topic">Driver Libraries Help</a> &gt; <a href="00122.html" target="topic">SD Card (SPI) Driver Library</a> &gt; <a href="00116.html" target="topic">Configuring the Library</a></div>
<div class="Element92">
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td width="25%">
<div class="Element1">
MPLAB Harmony Core Help</div>
</td><td width="25%">
<div class="Element2">
<a href="contents.html" target="tocidx">Contents</a> | <a href="00007.html" target="topic">Home</a></div>
</td><td width="25%">
<div class="Element90">
<a href="00120.html" target="topic">Previous</a> | <a href="00122.html" target="topic">Up</a> | <a href="00115.html" target="topic">Next</a></div>
</td><td width="25%">
<div class="Element96">
<a href="mailto:docerrors@microchip.com&subject=MPLAB Harmony Documentation Feedback (Topic ID: DRV SDSPI Configuring the Library Topic Title: Configuring the Library)&body=Thank you for your feedback! Please include a description of your feedback, and indicate whether you are reporting an an error in the documentation or an enhancement.">Documentation Feedback</a><br> <a href="http://support.microchip.com" target="_blank">Microchip Support</a></div>
</td></tr></table><div class="Element5">
Configuring the Library</div>
</div>
</div>

<!-- End Page Header -->

<!-- Begin Client Area -->
<div class="Element720" id="areascroll">
<div class="Element721">

<!-- Begin Page Content -->
<a name="PageContent"></a><div class="Element58">
<a name="4465736372697074696F6E"></a><div class="Element11">
<div class="Element10">
<p class="Element10">
<span style="color: #000000">The SDSPI driver library should be configured through the MHC. The following figures show the MHC configuration window for the SDHC driver and brief description.</span>&nbsp;</p>
<p class="Element10" style="text-align: center;">
<img src="drv_async_sdspi_plib.png" border="0" alt="" title="">&nbsp;</p>
<p class="Element10" style="text-align: center;">
<strong>Asynchronous Mode of SDSPI driver with SPI PLIB and File-System</strong>&nbsp;</p>
<p class="Element10" style="text-align: center;">
&nbsp;</p>
<p class="Element10" style="text-align: center;">
<img src="drv_async_sdspi_driver.png" border="0" alt="" title="">&nbsp;</p>
<p class="Element10" style="text-align: center;">
<strong>Asynchronous Mode of SDSPI driver with SPI Driver and File-System</strong></p><p class="Element10">
&nbsp;</p>
<p class="Element10" style="text-align: center;">
<img src="drv_sync_sdspi_plib.png" border="0" alt="" title="">&nbsp;</p>
<p class="Element10" style="text-align: center;">
<strong>Synchronous Mode of SDSPI driver with SPI PLIB and File-System</strong>&nbsp;</p>
<p class="Element10" style="text-align: center;">
&nbsp;</p>
<p class="Element10" style="text-align: center;">
<img src="drv_sync_sdspi_driver.png" border="0" alt="" title="">&nbsp;</p>
<p class="Element10" style="text-align: center;">
<strong>Synchronous Mode of SDSPI driver with SPI Driver and File-System</strong></p><div class="Element15">
Common User Configuration for all Instances</div>

<ul class="Element630">
<li class="Element600"><span style="color: #000000"><strong>Driver Mode:</strong></span>
<ul class="Element631">
<li class="Element601"><span style="color: #000000">Allows User to select the mode of driver(Asynchronous or Synchronous).This setting is common for all the instances of the SDSPI driver.</span></li>
<li class="Element601"><span style="color: #000000">When the SDSPI driver is used with SPI driver, the SPI driver inherits the driver mode from the SDSPI driver. That is, if the SDSPI driver is configured for Asynchronous mode then the SPI driver is automatically configured for Asynchronous mode and vice-versa.</span></li>
</ul></li>
</ul><p class="Element10">
&nbsp;</p>
<div class="Element15">
Instance Specific User Configurations</div>

<ul class="Element630">
<li class="Element600"><span style="color: #000000"><strong>PLIB Used:</strong></span>
<ul class="Element631">
<li class="Element601"><span style="color: #000000">Indicates the SPI peripheral instance used by the SDSPI driver</span></li>
</ul></li>
<li class="Element600"><span style="color: #000000"><strong>SPI Driver Instance Used:</strong></span>
<ul class="Element631">
<li class="Element601"><span style="color: #000000">Indicates the SPI driver instance used by the SDSPI driver</span></li>
</ul></li>
<li class="Element600"><span style="color: #000000"><strong>Number of Clients:</strong></span>
<ul class="Element631">
<li class="Element601"><span style="color: #000000">Indicates the number of clients to the given SDSPI driver instance</span></li>
</ul></li>
<li class="Element600"><span style="color: #000000"><strong>SD Card Speed (Hz):</strong></span>
<ul class="Element631">
<li class="Element601"><span style="color: #000000">The maximum SPI speed at which the SDSPI driver interacts with the SD Card</span></li>
<li class="Element601"><span style="color: #000000">SDSPI driver overrides the SPI PLIB clock speed settings</span></li>
</ul></li>
<li class="Element600"><span style="color: #000000"><strong>Card Detection Method:</strong></span>
<ul class="Element631">
<li class="Element601"><span style="color: #000000">Card detection method used. For SDSPI driver command-response based polling method is used for card insertion/removal</span></li>
</ul></li>
<li class="Element600"><span style="color: #000000"><strong>Polling Interval (ms):</strong></span>
<ul class="Element631">
<li class="Element601"><span style="color: #000000">Rate at which the SDSPI driver checks for card insertion and removal</span></li>
</ul></li>
<li class="Element600"><span style="color: #000000"><strong>File System For SDSPI Driver Enabled:</strong></span>
<ul class="Element631">
<li class="Element601"><span style="color: #000000">Indicates whether SDSPI driver will register its services with the file system or not</span></li>
<li class="Element601"><span style="color: #000000">This option is automatically checked when the file system is connected to the SDSPI driver</span></li>
</ul></li>
<li class="Element600"><span style="color: #000000"><strong>Chip Select Pin:</strong></span>
<ul class="Element631">
<li class="Element601"><span style="color: #000000">The SD Card chip select pin</span></li>
</ul></li>
<li class="Element600"><span style="color: #000000"><strong>Use Write Protect Pin (Active High)?</strong></span>
<ul class="Element631">
<li class="Element601"><span style="color: #000000">Enable write protection check. The selected write protect pin must be configured as GPIO input under the Pin Settings window</span></li>
</ul></li>
<li class="Element600"><span style="color: #000000"><strong>Use DMA for Transmit and Receive?:</strong></span>
<ul class="Element631">
<li class="Element601"><span style="color: #000000">Enable/disable DMA usage by the SDSPI driver. This option is available only when SDSPI driver is used with SPI PLIB. When SDSPI is used with SPI driver, the DMA must be configured in the SPI driver configuration.</span></li>
<li class="Element601"><span style="color: #000000"><strong>DMA Channel For Transmit:</strong></span>
<ul class="Element632">
<li class="Element602"><span style="color: #000000">Indicates the DMA channel the SDSPI driver will use for transmission</span></li>
</ul></li>
<li class="Element601"><span style="color: #000000"><strong>DMA Channel For Receive:</strong></span>
<ul class="Element632">
<li class="Element602"><span style="color: #000000">Indicates the DMA channel the SDSPI driver will use for reception</span></li>
</ul></li>
</ul></li>
<li class="Element600"><span style="color: #000000"><strong>RTOS Settings:</strong></span>
<ul class="Element631">
<li class="Element601"><span style="color: #000000"><strong>Stack Size:</strong></span>
<ul class="Element632">
<li class="Element602"><span style="color: #000000">The stack size of the SDSPI RTOS thread</span></li>
</ul></li>
<li class="Element601"><span style="color: #000000"><strong>Task Priority:</strong></span>
<ul class="Element632">
<li class="Element602"><span style="color: #000000">The priority of the SDSPI RTOS thread</span></li>
</ul></li>
<li class="Element601"><span style="color: #000000"><strong>Use Task Delay?:</strong></span>
<ul class="Element632">
<li class="Element602"><span style="color: #000000">Indicates whether the Task Delay is used to yield the SDSPI RTOS thread</span></li>
</ul></li>
<li class="Element601"><span style="color: #000000"><strong>Task Delay (ms):</strong></span>
<ul class="Element632">
<li class="Element602"><span style="color: #000000">Indicates the amount of time for which the SDSPI RTOS thread is put in blocked state by the scheduler before it is run again</span></li>
<li class="Element602"><span style="color: #000000">This inturn controls the rate at which the SDSPI driver checks for the SD Card attach/detach status</span></li>
</ul></li>
</ul></li>
</ul><p class="Element10">
&nbsp;</p>
<p class="Element10">
<span style="color: #000000"><strong>Note: </strong>The Time System Service is used by the SDSPI driver to maintain the SD Card protocol timings, and hence must be enabled.</span>&nbsp;</p>
<p class="Element10">
<span style="color: #000000"><strong>Note</strong>: The SDSPI driver should either be connected to SPI PLIB or SPI Driver. It should never be connected to both. Further all the instances of the SDSPI driver must either use the SPI PLIB or the SPI driver.</span></p></div>
</div>
</div>
<!-- End Page Content -->

<!-- Begin Page Footer -->
<div class="Element95">
<a href="00007.html" target="topic">Driver Libraries Help</a> &gt; <a href="00122.html" target="topic">SD Card (SPI) Driver Library</a> &gt; <a href="00116.html" target="topic">Configuring the Library</a></div>
<div class="Element93">
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td width="25%">
<div class="Element3">
MPLAB Harmony Core Help</div>
</td><td width="25%">
<div class="Element4">
<a href="contents.html" target="tocidx">Contents</a> | <a href="00007.html" target="topic">Home</a></div>
</td><td width="25%">
<div class="Element91">
<a href="00120.html" target="topic">Previous</a> | <a href="00122.html" target="topic">Up</a> | <a href="00115.html" target="topic">Next</a></div>
</td><td width="25%">
<div class="Element97">
<a href="mailto:docerrors@microchip.com&subject=MPLAB Harmony Documentation Feedback (Topic ID: DRV SDSPI Configuring the Library Topic Title: Configuring the Library)&body=Thank you for your feedback! Please include a description of your feedback, and indicate whether you are reporting an an error in the documentation or an enhancement.">Documentation Feedback</a><br> <a href="http://support.microchip.com" target="_blank">Microchip Support</a></div>
</td></tr></table></div>

<!-- End Page Footer -->
</div>
</div>

<!-- End Client Area -->
</body></html>